package com.twu.biblioteca;

import java.util.ArrayList;

public class movies {
    private ArrayList<Movie> movies ;
    public movies(){
        movies =new ArrayList<Movie>();
    }
    public movies(ArrayList<Movie> books){
        this.movies=new ArrayList<Movie>(books);
    }
    public ArrayList<Movie> getListofMovies(){
        ArrayList<Movie> m= new ArrayList<Movie>();
        for(Movie movie:movies){
            if(!movie.isChecked())
                m.add(movie);
        }
        return m;
        
    }

    public Movie getMovieById(int movieId) {
        for(Movie m: movies){
            if(m.getMovieId()==movieId)
                return m;
        }
        return null;
    }

    public void add(Movie title1) {
        movies.add(title1);

    }
}
